home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#02 (Apr85-Jul85)
/
modula 2
/
modula Vol. 1 #8
/
ListVolumes.MOD
< prev
next >
Wrap
Text File
|
1985-04-13
|
910b
|
41 lines
MODULE ListVolumes;
FROM VolumeTracer IMPORT VCB, VolumesOnLine, GetVolumeInfo;
FROM InOut IMPORT WriteString, ClearScreen, WriteLn, WriteCard,
WriteInt, Write, Read;
VAR
i, maxVols : CARDINAL;
vcb : VCB;
ch : CHAR;
PROCEDURE PrintVolName;
VAR
i : CARDINAL;
BEGIN
FOR i := 1 TO ORD(vcb.vcbVN[0]) DO
Write(vcb.vcbVN[i]);
END;
WriteLn;
END PrintVolName;
BEGIN
ClearScreen;
WriteString("Number of volumes on-line: ");
maxVols := VolumesOnLine();
WriteCard(maxVols,0);
WriteLn; WriteLn;
FOR i := 1 TO maxVols DO
GetVolumeInfo(vcb,i);
WriteString('Volume Name: ');
PrintVolName;
WriteString('Number of files in volume: ');
WriteInt(vcb.vcbNmFls,0);
WriteLn;
WriteString('Drive Number: ');
WriteInt(vcb.vcbDrvNum,0);
WriteLn;
WriteLn;
END;
Read(ch);
END ListVolumes.